import mongoose from 'mongoose';
import BaseModel from './base_model';

const Schema = mongoose.Schema;
const ObjectId = Schema.ObjectId;

const ProfileSchema = new Schema({
  appId:     { type: String, requried: true },
  guide:     { type: String, default: 'no data' },
  isHtml:    { type: Boolean, default: false },
  create_at: { type: Date, default: Date.now },
});

ProfileSchema.plugin(BaseModel);
ProfileSchema.index({ create_at: -1 });

mongoose.model('Profile', ProfileSchema);
